package libs.yzx.zaza.za;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/8/6
 */
public class Person implements Parcelable {

    public static final Creator<Person> CREATOR = new Creator<Person>() {
        @Override
        public Person createFromParcel(Parcel source) {
            return new Person(source);
        }

        @Override
        public Person[] newArray(int size) {
            return new Person[size];
        }
    };


    //

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    //

    /**
     * 必须的
     */
    public void readFromParcel(Parcel p) {
        name = p.readString();
    }


    public Person() {
    }

    /**
     * 必须的
     */
    public Person(Parcel p) {
        readFromParcel(p);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
    }
}
